@model IEnumerable<LetLord.Models.ReferencePhoto>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th></th>
        <th>
            Format
        </th>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            File
        </th>
        <th>
            DateUploaded
        </th>
        <th>
            UserId
        </th>
        <th>
            Tenant
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ImageId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ImageId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ImageId })
        </td>
        <td>
			@item.Format
        </td>
        <td>
			@item.Name
        </td>
        <td>
			@item.Description
        </td>
        <td>
			@Html.DisplayTextFor(_ => item.File).ToString()
        </td>
        <td>
			@String.Format("{0:g}", item.DateUploaded)
        </td>
        <td>
			@item.UserId
        </td>
        <td>
			@(item.Tenant == null ? "None" : item.Tenant.LastName)
        </td>
    </tr>
}

</table>


